// import * as React from 'react';
import * as React from 'react';
import { useState } from 'react';
import { Modal, Button } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons';

const Model = () => {
    //  函数组件hook
    const [visible, setVisible] = useState(false);
    //  evt:any
    const handleClick=( evt:any)=>{
      setVisible(true); 
    console.log(evt.target);
      
      // this.setState({sss:!this.state.sss,select:evt.target.childNodes[0].data})
      // console.log(evt.target.childNodes[0]);
      
      //  alert(evt.target.childNodes[0].data);
    }


    return (
        <>
      <Button type="primary" onClick={ handleClick}>
        出库完成确认
      </Button>
      <Modal
        title="出库确认"
        centered
        visible={visible}
        onOk={() => setVisible(false)}
        onCancel={() => setVisible(false)}
        width={500}

        // title= 'Confirm'
        // icon ={<ExclamationCircleOutlined />}
        // content = 'Bla bla ...'
        okText= '确认'
        cancelText= '取消'
        
      >
        <h2>入库确认完成？</h2>
        
      </Modal>
    </>
    );
}

export default Model;
